<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>基础设置-设置考核标准</title>
    <script src="/scripts/boot.js"></script>
</head>
<body class="bg-white">
<div id="viewForm">
    <!--<div class="title-info mb-20"><span>基本信息</span></div>-->
    <table class="table-bg" border="0" cellpadding="1" cellspacing="1" style="width:100%;table-layout:fixed;">
        <colgroup>
            <col width="135px"></col>
            <col width="50%"></col>
            <col width="135px"></col>
            <col width="50%"></col>
        </colgroup>
        <tr>
            <td class="text-titlebg">区域</td>
            <td>
                <div class="input-div color-66" id="fullName"></div>
            </td>
            <td class="text-titlebg noEmpty">项目名称</td>
            <td>
                <div class="input-div color-66" id="itemName"></div>
            </td>
        </tr>
        <tr>
            <td class="text-titlebg">组团</td>
            <td>
                <div class="input-div color-66" id="groupName"></div>
            </td>
            <td class="text-titlebg"><span class="color-red">*</span>期区名称</td>
            <td>
                <div class="input-div color-66" id="phaseName"></div>
            </td>
        </tr>
        <tr>
            <td class="text-titlebg"><span class="color-red">*</span>楼栋名称</td>
            <td>
                <div class="input-div color-66" id="buildingName"></div>
            </td>
            <td class="text-titlebg">楼层数</td>
            <td>
                <div class="input-div color-66" id="storiesNum"></div><span class="unit-span">层</span>
            </td>
        </tr>
        <tr>
            <td class="text-titlebg">建筑性质</td>
            <td>
                <div class="input-div color-66" id="architecturalNature"></div>
            </td>
            <td class="text-titlebg">计划建筑面积</td>
            <td>
                <div class="input-div color-66" id="planBuildingArea"></div><span class="unit-span">㎡</span>
            </td>
        </tr>
        <tr>
            <td class="text-titlebg noEmpty" >备注</td>
            <td colspan="3">
                <div class="textarea-div color-66" style="line-height: 1.5;" id="remark"></div>
            </td>
        </tr>
    </table>
    <div class="chose-toolbar">
        <a class="chose-button" onclick="CloseWindow('close')">关闭</a>
    </div>
</div>
<script type="text/javascript">
    var post_flag,form,state,datas;
    var view = {
        init: function () {
            post_flag = false; //设置一个对象来控制是否进入AJAX过程
            mini.parse();
            form = new mini.Form("#viewForm");
        },
//    数据展示
        SetData: function (data) {
            data = mini.clone(data);
            state = data.state;
            $.ajax({
                url:"/Building/info?id=" + data.id,
                type: "post",
                success: function (text) {
                    //跨页面传递的数据对象，克隆后才可以安全使用
                    datas = mini.decode(text);   //反序列化成对象
                    // form.setData(datas);             //设置多个控件数据
                    var datas = mini.decode(text);   //反序列化成对象
                    $.each(datas,function (key,value) {
                        $("#"+key).html(value);
                        if(key=="phase"){
                            $("#fullName").text(value.tSysNation.fullName);
                            $("#itemName").text(value.item.name);
                            $("#phaseName").text(value.phaseName);
                            $("#groupName").text(value.group.groupName);
                        }

                    });
                }
            });
        }
    };
    view.init();
</script>
</body>
</html>